package ejb;

import java.util.List;

import javax.ejb.Stateless;

import dao.SemestersDao;
import entity.Semesters;

@Stateless
public class SemestersBean implements SemestersBeanRemote, SemestersBeanLocal {
	
	@Override
	public void insert(Semesters semester) {
		SemestersDao.INSTANCE.save(semester);
	}

	@Override
	public void update(Semesters semester) {
		SemestersDao.INSTANCE.merge(semester);
	}

	@Override
	public void delete(Semesters semester) {
		SemestersDao.INSTANCE.delete(semester);
	}

	@Override
	public void get(Long id) {
		SemestersDao.INSTANCE.findById(id);
	}

	@Override
	public List<Semesters> getAll() {
		return SemestersDao.INSTANCE.findAll();
	}
}
